<%@ page import="java.util.List" %>
<%@ page import="com.example.teacher.model.Teacher" %><%--
  Created by IntelliJ IDEA.
  User: 86156
  Date: 2022/3/11
  Time: 19:40
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>讲师展示</title>
</head>
<body>

<table id="tab">
    <tr>
        <td>id</td>
        <td>name</td>
    </tr
    <%
        List<Teacher> teacherList= (List<Teacher>) request.getServletContext().getAttribute("teacherList");
        for (Teacher teacher:teacherList) {
            Integer id = teacher.getId();
            String name=teacher.getName();
    %>
    <tr>
        <td><%=id%></td>
        <td><%=name%></td>
    </tr>
    <%
        }
    %>
</table>
</body>
</html>
